﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text.RegularExpressions;

namespace MxTol.UI.Helpers
{
    /// <summary>
    /// 常用方法帮助类
    /// </summary>
    public class MethodHelper
    {
        /// <summary>
        /// 去掉字符串换行符
        /// </summary>
        public static string ToOneLine(string src)
        {
            //去掉字符串里所有的的C#换行符
            src = Regex.Replace(src, @"[\n\r]", "");

            //去掉末尾的C#换行符
            src = src.TrimEnd((char[])"\n\r".ToCharArray());

            return src;
        }
    }
}